<!DOCTYPE html	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" template="/template/template.xhtml"
	xmlns:s="http://sduept.security.el/func">
	<ui:define name="head">
	
	</ui:define>
	<ui:define name="content">
		<h:form>
			<p:dialog header="文件上传" height="300" width="600" modal="true" widgetVar="uploadDialog"
				resizable="true" dynamic="true" id="uploadDialog">
				<p:fileUpload label="选择" update="msgs" multiple="true" uploadLabel="上传"
					cancelLabel="取消" style="margin-top:10px"
					fileUploadListener="#{documentController4DownLoad.handleFileUpload}" mode="advanced"
					oncomplete="PF('uploadDialog').hide()" />
			</p:dialog>
			<p:growl id="msgs" showDetail="true" />
			<p:panel>
				<p:outputLabel for="docPath" value="文件全路径：" />
				<p:inputText id="docPath" value="#{documentController4DownLoad.docPath}" style="width:500px">
					<p:ajax update="@this" />
				</p:inputText>
				<h:outputText style="color:red;" value="  注意：上传文件时路径以/结尾，下载文件时路径要以文件名称结尾。"></h:outputText>
			</p:panel>
			<p:panel>
				<p:commandButton icon="ui-icon-arrow-1-n" value="上传文件"
					style="margin-left:5px;" oncomplete="PF('uploadDialog').show()"/>
				<p:commandButton value="下载文件" ajax="false" icon="ui-icon-arrow-1-s" actionListener="#{documentController4DownLoad.fileDownloadView}">
	                  <p:fileDownload value="#{documentController4DownLoad.file}" />
	             </p:commandButton> 
			</p:panel>
		</h:form>
		 
	</ui:define>

</ui:composition>